Skip to main content

FlowGptPrompt

Represents a GPT prompt step within a workflow, handling query execution and results.

Properties

NameDescription
CaptionThe caption dictionary representing localized captions for the flow object.
ExecutionTypeIndicates the execution type of the GPT query.
ResultObjectNameSpecifies the object name to store the query results.
ResumeOnErrorDetermines whether the query execution should continue when an error occurs.
KeyA unique identifier for the workflow step.
NameName for the workflow step.
StructureDefines the structure of the GPT query return type.
QueryResultHolds the result of the executed query.
QueryNameThe name of the GPT query to be executed.
QueryParametersA list of parameters used for the GPT query execution.
WorkflowCodeInstanceThe workflow code instance associated with the flow object.
ErrorOptionsDefines error-related options for the API step.
QueryIdSpecifies the unique identifier for the GPT query.
CachedDMObjectsThe cached document management objects related to the flow object.
TypeCodeThe type code associated with the flow object.

Constructors

NameDescription
FlowGptPrompt(name, workflowData, workflowCodeInstance)Initializes a new instance of the FlowGptPrompt class.
FlowGptPrompt(name, workflowData, workflowCodeInstance)Constructor for the FlowGptPrompt class. Initializes a new instance of the FlowGptPrompt class.
FlowGptPrompt(name,workflowData,workflowCodeInstance)Initializes a new instance of the FlowGptPrompt class with a name, workflow data, and workflow code instance.

Methods

NameDescription
ExecuteQueryAsync()Executes the GPT query asynchronously and stores the results.
GetResult<T>()Executes the query and returns the result as an IEnumerable of type T, where T is the C# class representing the JSON structure returned by the query.
Initialize()Initializes the FlowGptPrompt step with necessary configurations.
ToLiquid()Converts the query result to a Liquid-compatible format for template rendering.

Events

NameDescription
OnAfterExecution(sender, args)Occurs after the execution of the workflow step.
OnBeforeExecution(sender, args)Occurs before the execution of the workflow step.